<?php
include_once("XL_Database/database.php");
class Collection
{
      function Collection()
      {
        //do something
      }  
      
      function Lay_Bo_Suu_Tap_Cua_Nguoi_Dung_Hien_Hanh($ma_nguoi_dung)
      {
            $sql=@"select * from suu_tap 
            inner join bo_suu_tap on suu_tap.Ma_Suu_Tap=bo_suu_tap.Ma_Suu_Tap 
            inner join anh on suu_tap.Ma_Nguoi_Dung=Anh.Ma_Nguoi_Dung 
            inner join kq_comment on Anh.Ma_Anh=kq_comment.Ma_Anh 
            inner join comment on kq_comment.Ma_Comment=comment.Ma_Commnent where suu_tap.Ma_Nguoi_Dung=$ma_nguoi_dung ";
            $xldata = new database();
            $kq=$xldata->ExcuteObjectList($sql);
            return $kq;
      }
      function Lay_Thong_Tin_Cua_Bo_Suu_Tap_Theo_Nguoi_Dung($ma_nguoi_dung)
      {
            $sql=@"select * from suu_tap where suu_tap.Ma_Nguoi_Dung=$ma_nguoi_dung ";
            $xldata = new database();
            $kq=$xldata->ExcuteObjectList($sql);
            return $kq;
      }
      function Lay_Thong_Tin_Cua_Bo_Suu_Tap($ma_suu_tap)
      {
            $sql=@"select * from anh inner join kq_comment on anh.Ma_Anh=kq_comment.Ma_Anh inner join comment on kq_comment.Ma_Comment=comment.Ma_Comment  where anh.Ma_Suu_Tap=$ma_suu_tap ";
            $xldata = new database();
            $kq=$xldata->ExcuteObjectList($sql);
            return $kq;
      }
      
}
?>